<script>
import {defineComponent, h} from 'vue';

export default defineComponent({
  props: {
    scope: {
      type: Object,
      required: true
    },
    render: {
      type: Function,
      required: true
    },
  },
  setup(props) {
    const renderContent = () => {
      const {row, column, $index} = props.scope;
      return props.render(h, row, column, $index);
    };
    return {
      renderContent
    };
  },
  render() {
    return this.renderContent();
  }
});
</script>
